package kr.hkit.powerjava.chapter24.work2;

import java.util.Scanner;

import kr.hkit.powerjava.chapter24.work2.dao.DepartmentDAO;
import kr.hkit.powerjava.chapter24.work2.dao.StudentDAO;
import kr.hkit.powerjava.chapter24.work2.service.ServiceDepartment;
import kr.hkit.powerjava.chapter24.work2.service.ServiceItem;
import kr.hkit.powerjava.chapter24.work2.service.ServiceStudent;

public class ERP {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		boolean flag = true;
		
		System.out.println("1.학생정보\n2.학과정보\n3.종료");
		
		while(flag) {
			switch(sc.nextInt()){
				case 1:
					new ServiceStudent(new StudentDAO(), sc);
					break;
				case 2:
					new ServiceDepartment(new DepartmentDAO(), sc);
					break;
				default:
					flag = false;	//나가면 종료
					sc.close();
			}
		}
	}
}